$(function() {
	$(".next-bt").click(function() {
		if (boxWidth >= totalLength) {
			$(this).attr('disabled', false);
		} else {
			var offset = $('.model-column-inner li img').eq(pictureIndex).width() + 31;
			pictureWidth += offset;
			$(".model-column-inner").animate({
				"left" : -pictureWidth
			});
			$(".model-btr-inner").animate({
				"left" : -(pictureWidth + 1080) + 31
			});
			$(".model-btl-inner").animate({
				"left" : -(pictureWidth - 85)
			});
			totalLength -= offset;
			pictureIndex++;
		}
		changeUrl();
	});
	$(".pre-bt").click(function() {
		if (pictureIndex == 0) {
			$(this).attr('disabled', false);
		} else {
			pictureIndex--;
			var offset = $('.model-column-inner li img').eq(pictureIndex).width()+ 31;
			pictureWidth -= offset;
			$(".model-column-inner").animate({
				"left" : -pictureWidth
			});
			$(".model-btl-inner").animate({
				"left" : -(pictureWidth - 54)
			});
			$(".model-btr-inner").animate({
				"left" : -(pictureWidth + 1080)
			});
			totalLength += offset;
		}
		changeUrl();
	});
});